<!DOCTYPE html>
<html lang="zh-CN">
    <link href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
    <body>
        <div class="container">
            <div class="row">
                <form action="" method="post" style="margin:20px 0px;">
                    <div class="col-lg-12">
                        <div class="input-group">
                            <input type="text" class="form-control" value="<?php echo $serachKey;?>" name="search" id="search" placeholder="Search for...">
                            <span class="input-group-btn">
                                <button class="btn btn-default" type="submit">Go!</button>
                            </span>
                       </div>
                    </div>
                </form>
            </div>
            <div class="row">
                <div style="margin-top:20px;">
                    <table class="table table-bordered">
                        <tr>
                            <th>ID</th>
                            <th>NAME</th>
                            <th>SEX</th>
                            <th>LOVE</th>
                            <th>EMAIL</th>
                            <th>TIME</th>
                        </tr>
                        <?php 
                        if (is_array($search) && count($search) > 0 ) 
                        { 
                            foreach ($search as $key => $value) 
                            {
                        ?>
                        <tr>
                            <td><?php echo $value['id'];?></td>
                            <td><?php echo $value['username'];?></td>
                            <td><?php echo $value['sex'];?></td>
                            <td><?php echo $value['lovetwo'];?></td>
                            <td><?php echo $value['email'];?></td>
                            <td><?php echo $value['create_time'];?></td>
                        </tr>
                            <?php } ?>
                        <?php } else { ?>
                        <tr>
                            <td colspan="6">not match data.</td>
                        </tr>
                        <?php } ?>
                    </table>
                </div>
            </div>
        </div>
    </body>
    <script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
    <script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
</html>
